package com.example.clock.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

@TableName("attend_history")
@Data
public class AttendHistory {

    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 用户名
     */
    private String name;

    /**
     * 当前日期
     */
    private LocalDate currentDateTime;

    /**
     * 打卡时间
     */
    private LocalDateTime clockTime;

    /**
     * 设备
     */
    private String osType;

    /**
     * ip
     */
    private String ip;

    /**
     * 备注
     */
    private String remark;


    public AttendHistory() {
    }

    public AttendHistory(String name, LocalDate currentDateTime, LocalDateTime clockTime) {
        this.name = name;
        this.currentDateTime = currentDateTime;
        this.clockTime = clockTime;
    }

    public AttendHistory(String name, LocalDate currentDateTime, LocalDateTime clockTime, String osType, String ip) {
        this.name = name;
        this.currentDateTime = currentDateTime;
        this.clockTime = clockTime;
        this.osType = osType;
        this.ip = ip;
    }
}
